Print control apparatus with error recovery function and its print control method

ABSTRACT

In a print control apparatus, even when an error such as a paper jam or the like which needs the reprint occurs in a printer, in order to perform an error recovery to generate the accurate reprint result, for preparation of the error recovery, a command buffer preserving section to preserve commands and drawing attribute parameters of each page head (or a command file preserving section or a page buffer preserving section to preserve a drawing dot image) and a preservation command buffer use a redrawing or reprint preparing section to perform the error recovery by using the preserved contents (or a preservation command file uses a redrawing or reprint preparing section or a preservation page buffer reprinting section) are provided in the print control apparatus. When the error which needs the reprint occurs, even for a command of the type such that the drawing attribute parameters are handed over between pages, the accurate reprint is executed by using the preserved contents.

CROSS-REFERENCES TO RELATED APPLICATION

This is a continuation-in-part of the patent application (Ser. No.07/605,280) filed on Oct. 30, 1990.

BACKGROUND OF THE INVENTION

The invention relates to a print control apparatus and its print controlmethod and, more particularly, to an error recovery system of a paperjam error or the like occurring in a shuttle printer or a page printersuch as a laser printer, an LED (Light Emitting Diode) printer, an LCS(Liquid Crystal Shutter) printer, or the like.

Hitherto, an disclosed in JP-A-60-257262 (hereinafter, referred to as afirst prior art), a printer has command buffers of the number as many ascommands of the maximum number of sheets (hereinafter, simply referredto as a maximum holding number) which can be simultaneously printprocessed in the printer, in which each command buffer is used to hold aprint command transmitted from a host computer until the completion ofthe paper discharge as a normal end of the printing process of the printcommand. When an error such as a paper jam or the like which needs thereprint occurs, causes of the error are eliminated and then the printcommand after the time point of the occurrence of the error is read outfrom the command buffer and the print is again executed and the errorrecovery is performed.

In JP-A-3-155974 (hereinafter, referred to as a second prior art), whenan error such as a paper jam or the like occurs in a printer, theprinter notifies the kind of error occurring in a host computer and thepage in which such an error has occurred. The host computer which hasreceived such a notification again transmits a print command after thepage having the error to the printer for the error which needs thereprint, thereby enabling the printer to reprint the pages after theerror occurring portion.

In JP-A-3-224778 (hereinafter, referred to as a third prior art), whenan error such as paper jam or the like occurs in a printer, the printernotifies the kind of error which has occurred in a host computer, thehost computer which has received such a notification again transmits theprint command train after the head page constructing a document for theerror which needs the reprint.

For such a retransmitted print command train, the printer executes thefollowing processes with regard to the pages before the page having theerror.

(1) When a command is determined to be a setting command of attributeparameters by a command interpretation, the command is executed, so thatthe attribute parameters are set into a table called an attributeparameter table. The attribute parameters include a paper size, a linepitch, a character pitch, a character kind, a character size, a linetype, and the like.

(2) However, when the command is for drawing a character, a figure(straight line, arc, circle, polygon, or the like), an image, or thelike, the command is not executed.

(3) The printing process about the page buffer is not activated as well.

With respect to the pages after the page in which the error hasoccurred, the printer executes both of the image drawing process and theprinting process in the ordinary manner.

According to the above first prior art, for instance, in a laser printerhaving a printing speed of 20 sheets/min, the papers in a range fromabout ten to twenty sheets are substantially simultaneously concernedwith the printing process, so that the maximum holding number lieswithin a range from about 10 to 20. A capacity of the print command perpaper is equal to about two Mbytes in case of transmitting the image ofone page of the A4 size as image data of a density of 400 dots/inch.Therefore, in this case, a memory of at least about 20 to 40 Mbytes isnecessary as a special command buffer only for use of the error recoverymentioned above, so that there is a problem such that the costsremarkably increase. According to the first prior art, nothing isconsidered with respect to a point that the drawing attribute parametersare handed over between the pages. Therefore, even if the print commandis preserved, in case of performing the error recovery using thepreserved print command from the page having the error as a start page,the attribute parameters until the error occurring page are not handedover, so that there is also a problem such that the result of thereprint from the error occurring page cannot be printed as an originalpage by the attribute parameters before the occurrence of the error.

According to the second prior art, when the reprint is executed, thehost computer again transmits the print command train after the erroroccurring page to the printer. However, even when the host computeragain transmits the print command train after the error occurring page,the values of the attribute parameters which have been set and updatedby the print command train before the error occurring page cannot berecognized by only the retransmitted print command train, so that thereis a problem such that the inherent print by the attribute parametersbefore the error occurs cannot be performed.

According to the third prior art, with respect to the page before theerror occurring page, the printer interprets the command as mentionedabove and, in case of the setting command of the attribute parameters,the printer executes such a setting command and doesn't execute thecommand to draw an image and the printing process. Such a processingmethod is hereinafter called a command read skipping process. Such acommand read skipping process is a complicated process. That is, when aplurality of printer escape sequence commands which are peculiar to therespective companies and a plurality of page describing languages suchas Post Script (registered trade name of Adobe Systems Co., Ltd.) andInterpress (registered trade name of Xrox Co., Ltd.) are supported asvarious kinds of drawing commands, it is necessary to execute such aread skipping process with respect to each of various kinds of drawingcommands, so that there is a problem such that a development programamount increases.

The above problems are large subjects in, particularly, a print controlapparatus which executes the drawing process and the printing process asa multi task construction in a concurrent or parallel manner.

SUMMARY OF THE INVENTION

It is an object of the invention to solve the above problems and torealize a printing apparatus and a print control method which cangenerate an accurate print result without executing a vain reprint evenwhen an error such as a paper jam or the like which needs the reprintoccurs in a printer as mentioned above, by a small memory capacity andsimple processes.

To accomplish the above object, a print control apparatus according tothe invention includes;

1 a communication control section which receives from a host computer aprint command train having at least drawing commands which are arrangedin accordance with the order of print pages and indicate drawinginformation such as characters, a figure, an image, etc. and anattribute parameter setting command which is arranged at an arbitraryposition and indicates a format or the like to draw the image drawinginformation, as image data, regarding the drawing commands after theattribute parameter setting command;

2 a command buffer section for storing the received print command train;

3 a drawing processing section for sequentially reading the printcommand train from the command buffer section and executing a drawingprocess in accordance with the print command train in the normal stateand for again sequentially reading out the print command train after thepage which is not yet discharged at a time point of the occurrence of anabnormality and executing a drawing process in accordance with the printcommand train in an abnormality occurring state;

4 a page buffer section for storing dot image data drawn by the drawingprocessing section;

5 a print processing section for instructing the printer control sectionto print the dot image data stored in the page buffer section;

6 a printer control section for reading out the dot image data from thepage buffer section and executing a print control to a printer enginesection in accordance with an instruction from the print processingsection;

7 an abnormality processing section for monitoring an abnormality of theprinter engine section and for activating a reprinting process in thedrawing processing section in the case where an abnormality which needsthe reprint occurs; and

8 an attribute parameter table section for at least storing theattribute parameters set in accordance with the print command train readout in the drawing processing section until all of the pages regardingthe attribute parameters are discharged,

wherein when the abnormality occurs, the drawing processing sectionexecutes the drawing process by the attribute parameters of the page tobe again drawing processed which have been stored in the attributeparameter table section. The above method is hereinafter called acommand buffer preserving method.

In the command buffer preserving method, for instance, when the drawingprocessing section detects a page changing condition in the drawingprocess, the drawing processing section activates the print processingsection with respect to a page buffer whose drawing has been completed.The print processing section instructs the printer control section toexecute the print with respect to the page buffer section. The printerengine section executes the print by the control of the printer controlsection. The abnormality monitoring section detects an error regardingthe printer and newly activates the drawing processing section in caseof an error such as a paper jam or the like which needs the reprint. Theactivated drawing processing section executes the interpretation andexecution of the command of the page having the error in the commandbuffer section in accordance with the attribute parameters stored in theattribute parameter table section together with, for instance, the valueof a read pointer indicative of the reading position from the commandbuffer. According to the command buffer preserving method, the accurateprint result can be generated by preparing the command buffers of only acapacity (for instance, about 2 Mbytes in case of the A4 size and 100dots/inch mentioned above) which is necessary when the capacity islargest for one paper.

According to the command buffer preserving method as described above,since the attribute parameters are stored and managed separately fromthe print command train, by merely preparing the command buffers by onlythe capacity which is necessary when the capacity is largest for onepaper, the accurate print result can be generated at low costs becausethere is no need to prepare the special command buffers of the numberonly for the error recovery as many as the maximum holding number as inthe first prior art. On the other hand, since the drawing attributeparameters at the start of the drawing of each page have been preservedin the command buffer discharge queue section, even for a command of thetype such that the drawing attribute parameters are handed over betweenthe pages, the print result doesn't differ from the inherent print uponerror recovery. The reliability and use efficiency of the print controlapparatus can be improved.

To accomplish the above object, a print control apparatus according tothe invention includes:

1 a communication control section which receives from a host computer aprint command train indicative of drawing information such ascharacters, a figure, an image, or the like and attribute parametersetting information indicative of a format or the like to draw thedrawing information as image data;

2 a command buffer section for storing the received print command train;

3 a drawing processing section for sequentially reading out the printcommand train from the command buffer section and executing a drawingprocess every page in accordance with the print command train;

4 a page buffer section for storing dot image data drawn by the drawingprocessing section until at least the print of the relevant page isfinished;

5 a print processing section for instructing the printer control sectionto print with respect to the dot image data stored in the page buffersection;

6 a printer control section for reading out the dot image data from thepage buffer section and executing a print control to a printer enginesection in accordance with an instruction from the print processingsection;

7 an abnormality processing section for monitoring an abnormality of theprinter engine section and for activating a reprinting process of theprinter control section when an abnormality which needs the reprintoccurs; and

8 a page buffer number preserving section for preserving a page buffernumber indicative of a memory position of a discharge waiting page inthe page buffer,

wherein when the abnormality occurs, the printer control section readsout the dot image data of the page in which the abnormality has occurredfrom the page buffer number of the abnormality occurring page in thepage buffer number preserving section and executes a print control ofthe printer engine section. This method is hereinafter called a pagebuffer preserving method.

According to the page buffer preserving method, for instance, when thedrawing processing section detects a page changing condition in thedrawing process, the drawing processing section activates the printprocessing section with respect to the page buffer in which the drawinghas been completed and preserves the print page buffer number of thepage as an object to be printed. The drawing processing sectioninstructs the printer control section to print with respect to therelevant portion in the page buffer section. The printer engine sectionexecutes the print by the control of the printer control section. Theabnormality monitoring section detects an error regarding the printerand, when it is determined that the detected error is such as a paperjam or the like which needs the reprint, the abnormality monitoringsection executes a reprinting process of the page with the error in thepage buffer by the page buffer number preserved. With respect to onlythe page in which the completion of the print has finally beenconfirmed, the image data is cleared to zero from the page buffersection.

According to the page buffer preserving method as mentioned above, sincethe buffer areas in which the paper discharge has been finished can besequentially cleared, by preparing the page buffers of the number asmany as only the capacity which is necessary when the capacity islargest for one paper whose print has been finished, there is no need toprepare the special command buffers of the number only for the errorrecovery as many as the maximum holding number as in the first priorart. Thus, the accurate print result can be generated at low costs.Since the drawing result itself has been preserved in the page buffersection, even for the command of the type such that the drawingattribute parameters are handed over between the pages, the print resultdoesn't differ from the inherent print upon error recovery. Thereliability and use efficiency of the print control apparatus can beimproved.

To accomplish the above object, in addition to the command bufferpreserving method, the print control apparatus according to theinvention further comprises:

1 a secondary memory device for storing the print command train receivedfrom the command buffers as a plurality of command files in which theprint commands of the respective pages have been described;

2 a command file preservation control section for controlling thewriting and reading operations of the command files; and

3 a command file management table section for managing the memorypositions of the command files in the secondary memory device,

wherein when the abnormality processing section activates the reprintingprocess of the drawing processing section, the command file preservationcontrol section reads out the command files of the page which needs thereprint from the secondary memory device into the command buffers byrecognizing the memory position by the command file management tablesection, and the drawing processing section executes the drawing processto reprint by the print command train newly stored in the commandbuffers. This method is hereinafter called a command file preservingmethod.

According to the command file preserving method, for instance, when thedrawing processing section stores a predetermined amount of commandsinto the command work areas in the command buffer reading process, thecontents are stored as command files into the secondary memory device.When the drawing section detects the page changing conditions, thedrawing processing section stores the values of the present drawingattribute parameters as attribute files for the next page into thecommand file section and activates the printing process of the printprocessing section with respect to the page buffer in which the drawinghas been completed. After the print processing section instructed theprinter control section to print with regard to the page buffer section,the abnormality processing section detects the error about the printerand, when it is determined that the detected error is an error such as apaper jam or the like which needs the reprint, the drawing processingsection is newly activated. The activated drawing processing section,for instance, copies the contents of the attribute parameter file forthe first preservation page into the present attribute parameter tablefor the drawing process and stores the content of the preservationcommand file into the command buffer section and executes theinterpretation and execution of the commands in the command buffersection in accordance with the attribute parameters in the presentattribute parameter table.

According to the command file preserving method as mentioned above, thecommand buffer capacity can be further reduced that of the commandbuffer preserving method (the apparatus can operate even in case of atmost one byte) and there is need to prepare the special command buffersof the number only for the error recovery as many as the maximum holdingnumber as in the first prior art. On the other hand, since the drawingattribute parameters at the time of the start of the drawing of eachpage have been preserved in the attribute parameter file for each other,even for the command of the type such that the drawing attributeparameters are handed over between the pages, the print result doesn'tdiffer from the inherent upon error recovery. The reliability and useefficiency of the print control apparatus can be improved. In addition,by also using a plurality of kinds of error recovering modes, the errorrecovery of the high performance and high reliability can be alsoprovided to the user in accordance with the use situation of thesecondary memory device. Further, since the registration data such asfonts/external characters, formats, and the like has been commonlypreserved with respect to a plurality of pages, the file capacity forpreservation can be reduced. Therefore, the print control apparatus of ahigh cost performance can be realized.

According to the above command file preserving method, in place of thecommand with respect to each page, dot image data as a result of thedrawing into the page buffers is preserved and the error can be alsorecovered by using the dot image data. This method is hereinafter calleda drawing image file preserving method.

According to the drawing file preserving method, in the page bufferpreserving method, the dot image data as a result of the drawing of thepage buffers is further preserved as files into the secondary memorydevice, so that the command buffer capacity can be further reduced.

In all of the above methods, it is possible to solve the problems suchas increase in processing burden of the host computer, modification ofthe program, and the like in the second prior art. Further, since thecommand read skipping in the third prior art can be eliminated, anincrease in program amount of the print control apparatus can beeliminated.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be more apparent from the following detaileddescription, when taken in conjunction with the accompanying drawings,in which:

FIG. 1 is a constructional diagram showing the first embodiment of theinvention;

FIG. 2 is a diagram for explaining a command buffer management tablesection in the first embodiment of the invention;

FIG. 3 is a diagram for explaining an explaining as operating procedurein a normal state in the first embodiment of the invention;

FIG. 4 is a diagram for explaining an operating procedure in an abnormalstate in the first and third embodiments of the invention;

FIG. 5 is a constructional diagram in the case of applying a multi taskcontrol method in the first and second embodiments of the invention;

FIGS. 6, 7, 8, 9, 10, 11, and 12 are diagrams for explaining aprocessing procedure of each section in a print control apparatus in thefirst embodiment of the invention;

FIG. 13 is a diagram for explaining a processing procedure of a hostcomputer in the invention;

FIG. 14 is a diagram for explaining a hardware construction of theinvention;

FIG. 15 is a constructional diagram showing the second embodiment of theinvention;

FIG. 16 is a diagram for explaining a page buffer management tablesection in the second embodiment of the invention;

FIGS. 17 and 18 is a diagram for explaining operating procedures in anormal state in the second embodiment of the invention;

FIGS. 19, 20, 21, and 22 are diagrams for explaining a processingprocedure of each section in a print control apparatus in the secondembodiment of the invention;

FIG. 23 is a constructional diagram showing the third embodiment of theinvention;

FIG. 24 is a diagram for explaining a command file management tablesection in the third embodiment of the invention;

FIG. 25 is a diagram for explaining an operating procedure in a normalstate in the third embodiment of the invention;

FIG. 26 is a constructional diagram in case of applying a multi taskcontrol method in the third embodiment of the invention;

FIGS. 27, 28, and 29 are diagrams for explaining a processing procedureof each section of a print control apparatus in the third embodiment ofthe invention;

FIG. 30 is a diagram showing the relation between the writing mode andthe current total file writing amount in the third embodiment of theinvention;

FIGS. 31, 32, 33, 34, 35, and 36 are diagrams for explaining aprocessing procedure of each section of the print control apparatus inthe third embodiment of the invention;

FIG. 37 is a diagram for explaining a preserving state of each pagecorrespondence command data into a file in the third embodiment of theinvention;

FIG. 38 is a diagram showing an example of a print command train whichis used in the invention;

FIGS. 39A, 39B, 39C, and 39D are diagrams showing examples of the printresults in the normal print and the print results in the reprint in thecase where attribute parameters are not considered; and

FIGS. 40 and 41 are diagrams for explaining the fourth embodiment of theinvention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The first embodiment of the invention will be first described.

First, a construction of a print control apparatus 10 according to theembodiment will be described with reference to a constructional diagramof FIG. 1. The print control apparatus 110 includes: a hostcommunication control section 10; a command buffer 11; a command buffermanaging section 12; a command processing section 13; a page buffercontrol section 14; a page buffer 15; a printer control section 16, andan abnormality processing section 17. The host communication controlsection 10 receives a print command from a host computer 100 (not shown)and stores into the command buffer 11. The print command is also simplyreferred to as a command hereinafter. In the diagram, a solid lineindicates the flow of print data and a broken line indicates the flow ofcontrol information.

An example of a print command train which is transmitted from the hostcomputer 100 to the print control apparatus 110 will now be describedwith reference to FIG. 38. The print command train includes a documenthead section 3800, a first page section 3810, a second page section3820, a third page section 3830, . . . , and the like. Further, thedocument head section 3800 includes a reset command 3801 to initializeattribute parameters and the like. The first page section 3810, secondpage section 3820, and third page section 3830 includes: a train ofsetting commands of various kinds of attribute parameters and a train ofvarious kinds of drawing commands to designate the drawing and printcontents of the first to third pages; and page changing commands 3819,3829, and 3839 to indicate delimiters of pages. In the example, assetting commands of the attribute parameters, there are shown a papersize setting command 3811, a print sheet number setting command 3812, acharacter kind setting command 3813, character size setting commands3814 and 2824, a line width setting command 3816, a line type settingcommand 3817, and a painting pattern setting command 382A. However,arbitrary attribute parameters regarding the drawing and print can bealso set by using the setting commands of the various kinds ofparameters. In the example, character code trains 3815, 3825, and 3835to instruct the drawing of a character train, arc drawing commands 3818and 3838, and a polygon painting command 382B are shown as drawingcommands. However, an arbitrary character, figure, or image can be drawnby using the above drawing commands. In the example, the page changingcommands 3819, 3829, and 3839 showing clearly the page delimiters arearranged at the end of each page section. However, in place of the pagechanging commands, the page delimiters can be also tacitly shown. Asexamples of the tacit page delimiters, there are a paper size changingcommand, a print sheet number setting command, a printing direction(portrait=vertical length/landscape=lateral length) designating command,an automatic page change, and the like. The paper size changing command,the print sheet number setting command, and the printing directiondesignating command can be designated only once in one page. When anyone of those commands exists in the page, it is possible to decide thatthe page must be changed to the next page. When the character drawing isinstructed and lines to be printed exceed a line length per a paper, inwhich the automatic page change denotes a function the print controlapparatus executes (a) the print of ones of the lines to be printed forthe line length, (b) the page change, and (c) the print of the remaininglines on the next page.

FIGS. 39A to 39D show the print results by the print control apparatus110 and the printer engine 120 for the print command trains shown inFIG. 38. Reference numerals 3910, 3920, and 3930 denote print results inthe case where the first, second, and third pages have normally beenprinted.

The attribute parameter setting command can be set at an arbitraryposition independent of the page delimiter positions. The attributeparameter values which have once been set are maintained until they aresubsequently reset or are initialized by the reset command. Therefore,after the first and second pages were normally printed by the printerengine, when a print error such as a paper jam or the like occurs duringthe print of the third page, if the reprint is executed in accordancewith the command train for the third page and the following pageswithout considering the attribute parameters, the result of the reprintdiffers from the original print before the error occurs. As a result ofthe reprint with respect to the third page in such a case, it is printedas shown by reference numeral 3940 and differs from the inherent printresult 3930.

The command buffer managing section 12 controls pointers for reading outand writing from/into the command buffer 11 and preserves the content ofthe command buffer 11. Therefore, a command buffer management tablesection, which will be explained hereinlater and shown in FIG. 2, in thecommand buffer managing section 12 (in FIG. 1, only a command bufferdischarge queue section as an important portion is shown) is used.

The command processing section 13 includes a drawing processing section131 and a print processing section 132. The drawing processing section131 reads out a command from the command buffer 11 and interprets andexecutes the command. As a result of the execution of the command, acharacter, figure, image, or the like is drawn as dot image data in thepage buffer 15. When the page changing condition is satisfied during theexecution of the command, the drawing of the page is completed and theprint processing section 132 is activated with regard to the page bufferfor whose content the drawing has been completed. A section 1311 forpreserving the content of the command buffer and a section 1312 forpreparing redrawing/reprint by use of the preserved content of thecommand buffer are provided in the drawing processing section 131. Thecontent of the command buffer is preserved in the preserving section1311 on a page unit basis for preparation of the error recovery untilthe end of paper discharge is confirmed. The preparing section 1312performs the reprint by using the commands preserved in the commandbuffer 11.

The print processing section 132 instructs the printer control section16 to print by using the print instructing section 1321.

The page buffer 15 is constructed by a bit map memory and ordinarily hascapacity for one or a plurality of pages as an object/objects of thedrawing as mentioned above. The page buffer control section 14 controlsthe page buffer 15.

When the printer control section 16 receives a print instruction fromthe print processing section 132, the section 16 generates a series ofprint commands to a printer engine 120 through a printer engineinterface. After that, a reading circuit in the printer control section16 reads out the content of the page buffer in which print data has beendrawn and supplies to the printer engine 120. The printer engine 120executes a printing process and prints the content onto a paper. Adischarge end monitoring section 161 and a discharge end processingsection A 1621 are provided in the printer control section 16. Thesection 161 monitors the end of discharge of the printed paper from theprinter engine 120 and activates the processing section A 1621 at thetime point of the detection of the end of paper discharge.

The section 17 executes abnormality processing for various kinds ofabnormalities detected by the respective sections of the print controlapparatus 110. A reprint preparing section A 171 is provided for theabnormality processing section 17, thereby preparing for the reprintwhen the error which needs the reprint is detected.

The content of a command buffer management table section 20 will now bedescribed with reference to FIG. 2. The management table section 20includes: a head address 21 of a command buffer area; an end address 22thereof; a write start pointer 23; a write end pointer 24; a data endpointer 25 in the command buffer; a command buffer read pointer 26; anda pointer 27 of the root of a command buffer discharge queue. Amongthem, the write start pointer 23, the write end pointer 24 and the dataend pointer 25 are used to control the writing operation of the commandto the command buffer 11 by the host communication control section 10 orthe like. The command buffer read pointer 26, the data end pointer 25,the write start pointer 23 and the like are used to control the readingoperation of the commands from the command buffer 11 by the drawingprocessing section 131.

The root pointer 27 is a pointer for the root of the command bufferdischarge queue section 121. Constructing objects called command blocksare connected to the pointer 27 one after another. Each command blockhas a pointer (271, 281, 291) to the next command block as a firstelement, a section (272, 282, 292) for preserving a command page endpointer as a second element, and a section (273, 283, 293) forpreserving an attribute parameter table as a third element. That is, thequeue section 121 in FIG. 1 is constructed by the root pointer 27 andthose command blocks.

An operating procedure in a normal state of the print control apparatus110 will now be described with reference to FIG. 3.

First, the print control apparatus 110 receives print command trainsfrom the host computer 100 by using a command receiving section in thehost communication control section 10 and stores into the command buffer11 (301). The print command trains are used to describe a document ofone or more logical pages. Each logical page is defined by one or moreprint command trains.

The print command trains stored in the command buffer 11 are read outsequentially by the drawing processing section 131 in accordance withthe receiving order (302). After that, each of them is interpreted andexecuted. Thus, a character, figure, image, or the like is drawn in thepage buffer 15 (303). When the page changing condition is satisfiedduring the execution of the commands, the drawing processing section 131activates the preserving process (304) and the print processing section132 (305). The print processing section 132 generates a printinstruction to the printer control section 16 (307). After that, thesection 132 enters the discharge end waiting state (308). The printercontrol section 16 executes the above operating procedure for theprinter engine 120 and the content which has been drawn in the pagebuffer is consequently supplied as a video signal to the printer engine120 (309). The printer control section 16 activates a timer formonitoring the discharge end of a paper at the start time point of theoutput of the page buffer content (310). For instance, according to aconstruction shown in FIG. 5, which will be explained hereinafter, whenthe time-out of the discharge end monitoring timer is detected, thetimer control section 5115 activates the discharge end process 1 in theprinter control section 16 (3121). In the discharge end process 1, theforegoing processes are executed. As one of them, the print processingsection 132 in the discharge end waiting state is canceled from such astate (313). Thereafter, the print end page number is updated (314).

An operating procedure in an abnormal state of the print controlapparatus 110 will now be described with reference to FIG. 4. It is nowassumed that the same processes in steps 301 to 309 as those in FIG. 3have been executed. In this instance, it is assumed that a paper jamerror has occurred in the printer engine 120 (321). The printer engine120 notifies the occurrence of the error to the printer control section16 in accordance with the printer engine interface (322). The controlsection 16 notifies the kind of error to the abnormality processingsection 17 to activate it (323). As error kinds, there are "paper jam","door open", and the like as errors which need the reprint, and "nopaper", "no toner", "defective printer mechanism", and the like aserrors which don't need the reprint.

The abnormality processing section 17 executes the following processes.

(1) The processes of the print processing section 132 and drawingprocessing section 131 are interrupted (324, 325).

(2) The occurrence of error is notified to the host computer 100 throughthe host communication control section 10 (326, 327).

(3) A check is made to see if the error detected is an error such as apaper jam which needs the reprint or not. If YES, the followingprocesses are executed.

(3-1) All of the processes of the print processing section 132 anddrawing processing section 131 are forcedly finished (all of the presentprocesses are canceled. When they are restarted, those processingsections are set into a state in which the retry of the processes arenecessary from the beginning) (3281).

(3-2) As a reprint preparation 1, a check is made to see if the commandindicating that the paper discharge is incompleted has been preserved inthe command buffer or not. If YES, a reprint error flag is set to ON(3291).

(3-3) The process of the drawing processing section 131 is activated(3301).

(4) The print control apparatus 110 executes an operating procedure inthe normal state hereinafter. That is, the drawing processing section131 executes the drawing (331) and the activation (332) of the printprocessing section. The print processing section 132 executes theprocess such as a print instruction (334) or the like.

The print control apparatus can be also realized as an expanded functionto the invention (U.S. Pat. No. 4,992,958 which issued from to U.S.patent application Ser. No. 07/373,262 or U.S. patent application Ser.No. 08/003,943, now U.S. Pat. No. 5,265,209, which is a continuation ofU.S. patent application Ser. No. 07/605,280, now abandoned) which hasalready been filed by the applicant of the invention shown in FIG. 5.Namely, the processes of the drawing processing section 131 and printprocessing section 132 are set to a multi task construction, therebyalso enabling those processes to be executed in a concurrent or parallelmanner. In such a case, the component elements in FIG. 1 are made tocorrespond to component elements in FIG. 5 in the following manner andare realized as one function.

(1) Host computer 100→host computer 510

(2) Host communication control section 10→host communication controlsection 5118

(3) Command buffer 11→command buffer 511

(4) Command buffer managing section 12→e.g., host communication controlsection 5118

(5) Drawing processing 131→drawing task processing section 5131.

(6) Print processing section 132→print task processing section 5132

(7) Page buffer control section 14→page buffer control section 5116.

(8) Page buffer 15→page buffer 514

(9) Printer control section 16→printer control section 5117.

(10) Abnormality processing section 17→realized as one of the functionsof the printer control section 5117, the print task processing section5132, the drawing task processing section 5131, etc.

(11) Printer engine 120→printer engine 516.

As component elements in FIG. 5, there are used component elementsdesignated by reference numerals which are obtained by adding "5" touppermost digits the reference numerals in FIG. 1 as the referencenumerals in the above invention which has already been filed.

According to the above realizing method, since a CPU, a printer engine,and a page buffer (which can be also constructed for a plurality ofpages) can be used without a blank time, the print throughputs in thenormal state and upon error recovery can be improved and the print canbe realized at the higher speed of the printer engine.

A processing procedure of each section of the print control apparatus110 will now be described with reference to FIGS. 6 to 12.

The processing procedure of the drawing processing section 131 will befirst explained with reference to FIG. 6. First, various kinds ofparameters for drawing and a table which are provided in the drawingprocessing section 131 are first initialized (6110) by the drawingpreparation (6109). As one of them, a check is made to see if thereprint error flag is ON or not (6111). When it is ON, the followingthree items are executed by the preparing section 1312 as preparingprocesses for redrawing/reprint by use of the preserved content in thecommand buffer (6112-1).

(1) The value of the command read pointer 26 indicative of the readingposition of the command buffer is preserved as a value of the secondelement (the preserving section 272 for the command page end pointer) ofthe head command block of the command buffer discharge queue.

(2) Among the various kinds of parameters for drawing, the value of thecurrent drawing attribute parameter is preserved as a value of the thirdelement (the preserving section 273 for the attribute parameter table)of the head command block of the discharge queue.

(3) The reprint error flag is set to OFF.

After completion of the drawing preparation, the command interpretation(6121) and command execution (6130) are repeated through an endless loopas drawing processes (6120).

In the command execution 6130, a branching process is executed inaccordance with the commands (6131). The designation of the paper size(6132), the designation of the number of print sheets of paper (6133),the drawing of a character (6134), the drawing of a figure (6135), thepage change (6136), and other process (6137) are executed. In the pagechange (6136), the processes as indicated by reference numerals 6136-1,6136-2, 6136-3, 6136-4, and the like are executed. Among them, theprocesses other than the process 6136-3 are substantially similar tothose in case of the invention which has already been filed. In thepreserving process (6136-3) of the content of the command buffer, by thepreserving section 1311, the command block having the current commandbuffer read pointer as a second element and the current drawingattribute parameter value as a third element is connected to the end ofthe discharge queue 121. In the print processing activation (6136-4),the print processing section 132 is activated with respect to the pagebuffer for which the drawing has been performed.

The processing procedure of the print processing section 132 will now bedescribed with reference to FIG. 7. In this process, the reservation ofthe printer (709), the confirmation of the ready state (710), theconfirmation of the paper feed section and paper discharge section(711), the instruction of the paper feed section and paper dischargesection (712), the instruction of the print (714), the shift to thedischarge end waiting state (715), printer free (717), and the end oftask (718) are sequentially executed. The contents of those processesare substantially similar to those in the case of the foregoinginventions (disclosed in JP-A-2-70465 and JP-A-3-178466). Thereservation of the printer (709), the printer free (717), and the taskend (718) are necessary when the multi task method is realized.

The interrupting processing procedure in the printer control section 16will now be described with reference to FIG. 8. In the interruptingprocess, in accordance with interruption factors (810), the output of avertical sync signal (811), the activation of the discharge endmonitoring timer (812), and the output of the video signal (813) areexecuted, the abnormality process is executed (814), and processesregarding the other interruption factors are executed (815). Thecontents of processes in the above routine are also substantiallysimilar to those in the case of the foregoing inventions (disclosed inJP-A-2-70465 and JP-A-3-178466).

The processing procedure in a timer control section 5115 will now bedescribed with reference to FIG. 9.

When the timer is operating (910), a process regarding each timer itemis executed (911 to 915). With regard to the discharge end monitoringtimer, the timer value is counted down (912). When the time-out of thetimer is detected (913), the discharge end process A 1621 is activated(914).

The processing procedure of the discharge end process A (1621) will bedescribed with reference to FIG. 10. In this process, after the serialnumber of a page for which discharge operation is completed is updated(1011), the value of the write end pointer indicative of the endposition of the content written into the command buffer is updated tothe value of the command page end pointer stored in the preservingsection as a second element of the head command block of the dischargequeue (1021). Subsequently, the head command block is removed from thedischarge queue (1031). After that, the print task as an object of thedischarge end monitor is released from the discharge end waiting state(1041).

The abnormality processing section 17 executes the following processingprocedures as shown in FIG. 11.

(1) The state of the print control apparatus is set into the printdisable state and this fact is displayed on a user operation panel(1100).

(2) The processes of the print processing section and drawing processingsection are interrupted. In case of the multi task construction, aplurality of print tasks and one or more drawing tasks are interrupted(1110).

(3) The serial number of the page in which the error has occurred isdetermined from the discharge completion page serial number (1120).

(4) The error code and the error occurring page serial number arenotified to the host computer 100 through the host communication controlsection 10 (1130).

(5) Until the causes of the error are removed (1140), the error state ofthe printer is confirmed (1141) and the confirmed latest error isdisplayed on a user operation panel section 5107 (1142).

(6) A check is made to see if the detected error is one such as paperjam or printer door open during the printing operation which needs thereprint or not (1160). If YES, the following processes are executed.

(6-1) All of the processes of the print processing section 132 anddrawing processing section 131 are forcedly finished (1161-1).

(6-2) The reprint preparation A is executed (1162-1). In the reprintpreparation 1, as shown in FIG. 12, a check is made to see if thecommand indicative of the incompletion of the paper discharge has beenpreserved in the command buffer or not by discriminating whether thedischarge queue is not blank or not (1211). When such a command has beenpreserved, the reprint error flag is turned ON (1221).

(6-3) The state of the print control apparatus 110 is set into theprintable state (online) and this fact is notified to the user operationpanel section 5107 (1163).

(6-4) The process of the drawing processing section 131 is activated(1164-1).

(7) When the detected error is not one which needs the reprint, thefollowing processes are executed.

(7-1) The state of the print control apparatus 110 is set into theprintable state (online) and this fact is displayed on the useroperation panel section 5107 (1165).

(7-2) The processes of the print processing section and the drawingprocessing section are restarted (1166).

After the absence of the printer error was detected in the abnormalityprocessing section, for instance, the reprint can be also activated byan instruction from the host computer 510 or by an instruction from apanel control section 5119.

The processing procedure of the host computer 100 will now be describedwith reference to FIG. 13. In this process, when there is a printinstruction from the user (1330), the print command train is read outfrom a memory section of the host computer (1331). The print commandtrain is transmitted to the print control apparatus (1332). When anerror occurs in the printer (1340), the apparatus waits for an errorrecovery instruction from the user (1341) and, thereafter, a restartinstructing command is transmitted to the print control apparatus 110(1342).

The processing procedures 1340, 1341, and 1342 are used in the case oftransmitting the error recovery instruction to the print controlapparatus after waiting for the error recovery instruction from theuser. The above procedure is not used in such an error that after thecauses of the error were removed, the print control apparatus isautomatically recovered without waiting for the error recoveryinstruction from the user. When the error notification is received(1350), the error is displayed by the display section of the hostcomputer (1351).

A hardware construction of the print control apparatus 110 will now bedescribed with reference to FIG. 14. The print control apparatus 110includes: a CPU bus 1401; a host communication controller 1402; a CPU1403; ROM 1404; a sub CPU 1406; a user operation panel 1407; a printermemory controller 1409; and a RAM 1400A. The CPU bus 1401 includesvarious kinds of input/output signals (address signal, data signal, andother control signals) of the CPU 1403.

The CPU 1403 transmits and receives data to/from the peripheralcontrollers 1402, 1406, 1409, and the like and the memories 1404, 1400A,and the like through the CPU bus 1401. The host communication controller1402 is for the print control apparatus 110 to communicate with the hostcomputer 100. As a physical interface (I/F) of the above communication(referred to as a host I/F), an SCSI (Small Computer System Interface),RS232C, RS422, GP-IB (General Purpose--Interface Bus), Centronics, HDLC(High-Level Data Link Control), etc. can be used. A proper one of themis installed as a hardware logic of the controller 1402 in accordancewith the kind of physical I/F which is used. An initial program loaderIPL of the print control apparatus 110 and a part of character fonts arestored in the ROM 1404. In the RAM 1400A, there are stored: (a) acontrol program of the print control apparatus 120; (b) remainingcharacter fonts; (c) a command buffer section memory; (d) a page buffersection memory; and (e) various kinds of management tables such as pagebuffer management table, a task management table, and the like and theother. Among them, (a) and (b) are stored by downloading from the hostcomputer 100 by the IPL program. On the other hand, (a) and (b) can bealso previously stored into the ROM 1404 without storing into the RAM1400A. On the contrary, all of the character fonts can be also storedinto the RAM 1400A without storing any of them into the ROM 1404. Thesub CPU 1406 executes transmitting and receiving processes between thesub CPU 1406 and the user operation panel 1407 and printer engine 120 inaccordance with instructions of the CPU 1403. The printer memorycontroller 1409 executes the process to read out the content of the RAM1400A (ordinarily, content of the page buffer) to the printer engine 120and executes the control (refresh or the like) of the DRAM memory in thecase where the RAM 1400A is composed of a DRAM. The reading process isexecuted by using an internal DMA (Direct Memory Access) function. At atime point at which the reading operation of the data for one page fromthe page buffer is finished, the printer memory controller 1409 assertsan interruption signal (a part of the signals on the CPU bus 1401) tothe CPU 1403 and activates a page buffer reading end interruptingprocess by the CPU.

The print control apparatus 110 executes the communication with theprinter engine 120 by the sub CPU 1406 through a signal line 1400C-1 andby the printer memory controller 1409 through a signal line 1400C-2 inaccordance with an I/F called a printer engine I/F. In the case wherethe printer engine 120 is a shuttle printer, the printer memorycontroller 1409 converts the format of the content of the page buffer 15and, thereafter, supplies to the printer engine 120 through the signalline 1400C-2. In the case where the printer engine is a laser printer,the printer memory controller 1409 parallel-to-serial converts thecontent of the page buffer and, thereafter, supplies to the printerengine through the signal line 1400C-2. In the case where the printerengine is the shuttle printer, the signal line 1400C-1 is used toreceive a signal indicative of the page head position and the like fromthe printer engine. In the case where the printer engine is the laserprinter, the signal line 1400C-1 is used for the sub CPU 1406 totransmit a command for inquiry or instruction to the printer engine 120and to convey a command for receiving a response status from the printerengine 120, status transmission/reception signals, and a control signalfor controlling a reading procedure to read out the content of the pagebuffer 15 to the printer engine 120.

In the embodiment, it is sufficient to prepare the command buffer havingthe capacity which is necessary to store the print commands for onesheet of paper. There is no need to prepare the special command buffersdedicated for the error recovery and having the capacity for the maximumnumber of pages to be preserved, as in the first prior art. Therefore,the cost performance of the print control apparatus can be raised. Sincethe drawing attribute parameters at the start of the drawing of eachpage have been preserved in the command buffer discharge queue, even fora command of such a type that the drawing attribute parameters arehanded over between the pages, the print result doesn't differ from theinherent print upon error recovery. The reliability and use efficiencyof the print control apparatus can be improved. It is also possible toeliminate the increase in processing burden of the host computer and themodification of the program in the second prior art. The command readskipping process in the third prior art can be omitted, so that theincrease in development program amount of the print control apparatuscan be avoided.

The second embodiment of the invention will now be described. First, aconstruction of a print control apparatus in the embodiment will now bedescribed with reference to a constructional diagram of FIG. 15. A printcontrol apparatus 1510 includes: a host communication control section150; a command buffer 151; a command processing section 153; a pagebuffer control section 154; a page buffer 155; a printer control section156; and an abnormality processing section 157.

The host communication control section 150 executes processes similar tothose in the first embodiment (in case of FIG. 1). The commandprocessing section 153 includes a drawing processing section 1531 and aprint processing section 1532. The drawing processing section 1531 alsoexecutes processes similar to those in the first embodiment (in case ofFIG. 1) and reads out a command from the command buffer 151 andinterprets and executes. In the command execution, when the pagechanging condition is met, the drawing of the page is finished and theprint processing section 1532 is activated with respect to the pagebuffer for which the drawing has been performed. The print processingsection 1532 instructs the printer control section 156 to print by usinga print instructing section 15321.

Further, a page buffer preserving section 15322 and a preserved pagebuffer releasing section 15323 are provided in the print processingsection 1532. The content of the page buffer is preserved in the section15322 for error recovery. The section 15323 releases the preservedcontent of the page buffer at the end of the paper discharge. The pagebuffer control section 154, the page buffer 155, and the printer controlsection 156 also execute functions similar to those in the firstembodiment. A page buffer discharge queue section 1541 as a series ofconstructing objects called print blocks is provided in the page buffercontrol section 154. Each print block has a page buffer number as asecond element and a print task number as a third element and is used tomanage the preservation and release of the content of the page bufferfor error recovery.

A discharge end monitoring section 1561 and a discharge end processingsection B 15622 are provided in the printer control section 156. Thesection 1561 monitors the end of paper discharge from a printer engine1520 of a print paper and activates the discharge end processing sectionB 15622 at the time point when the end of paper discharge is detected.

The section 157 executes abnormality processes for various kinds ofabnormalities detected by respective sections of the print controlapparatus 1510. A section 1572 is provided in the abnormality processingsection 157 and executes the reprint by using the preserved content ofthe page buffer preserved at the time of the detection of the errorwhich needs the reprint.

The content of a page buffer management table section 16A will now bedescribed with reference to FIG. 16. The management table section 16A isused to manage the page buffer for one or more pages and includes:common information 16A1 for the whole page buffer; information 16B1 forthe page 0; information 16B2 for the page 1; . . . ; and information16B3 for the page N-1. N denotes the total number of pages and isdescribed as one item in the common information 16A1 for whole pagebuffer as will be explained hereinlater. The common information 16A1 forthe whole page buffer includes: a relevant drawing page number 16A2; arelevant print page number 16A3; a total number (N) of pages 16A4; apointer 16A5 of the root of a page buffer discharge queue; and the like.Among them, the contents other than the pointer 16A5 of the root of thepage buffer discharge queue are similar to those in the foregoinginvention which has been filed.

The pointer 16A5 of the root of the page buffer discharge queue is apointer of the root of the page buffer discharge queue 15A1.Constructing objects called print blocks (16C0 to 16E0) are connected tothe pointer 16A5 one after another. Each print block (16C0 to 16E0) hasa pointer (16C1, 16D1, 16E1) to the next print block as a first element,a page number (16C2, 16D2, 16E2) as a second element, and a print tasknumber (16C3, 16D3, 16E3) as a third element. The page number of thesecond element and the print task number of the third element areobtained by recording the task number of the print task and the printpage number as an object for print into the print block at the timepoint at which each print task instructs the print regarding a certainpage. Such a recording is canceled at the time point at which the aboveprint is normally finished and the printed paper is normally discharged.When an error which needs the reprint occurs, the error recovery processis executed by using such a recording.

The operating procedure in the normal state of the print controlapparatus will now be described with reference to FIG. 17.

The procedures from the reception and storage of the print command train(1701) to the drawing (1703) are the same as those in case of the firstembodiment (FIG. 3). Thereafter, in the embodiment, the print processingsection is activated (1705) without performing the command bufferpreserving process (3041). The print processing section 1532 executesthe page buffer preserving process (1706) and generates the printinstruction to the printer control section 156 (1707) and then entersthe discharge end waiting state (1708). Hereinafter, the activation ofthe discharge end monitoring timer (1710), the cancellation of thedischarge end waiting state (1713), and the updating of the print endpage number (1714) are executed by the same procedures as those in caseof the first embodiment (FIG. 3). Subsequently, the print processingsection 1532 executes a preservation page buffer clearing process (1715)and finishes a series of normal printing procedure.

The operating procedure in an abnormal state of the print controlapparatus will now be described with reference to FIG. 18. Theprocedures after completion of the reception and storage of the printcommand train (1701) until the notification of the error to the hostcomputer 100 (1827) are substantially the same as those in case of thefirst embodiment (FIG. 4). Thereafter, in the embodiment, the followingprocesses are executed.

(1) A check is made to see if the detected error is one such as a paperjam which needs the reprint or not. If YES, the following processes areexecuted.

(1-1) All of the processes of the print processing section 1532 areforcedly finished. The embodiment differs from the first embodiment in apoint that the processes of the drawing processing section are notforcedly finished (the processes so far are not cleared but are onlyinterrupted) (18282).

(1-2) A reprinting process is executed and a check is made to see if anypage in which the paper discharge is not completed yet have beenpreserved in the page buffer 155 or not. If YES, the print taskprocessing section is activated with respect to all of the preservedpage (18292).

(1-3) The processes of the drawing processing section 1531 arerestarted. Since the drawing process is not forcedly finished in step(1-1) as in the first embodiment, it is sufficient to restart thoseprocesses and there is no need to activate them (18302).

(2) The print control apparatus 1510 execute the operating procedure inthe normal state hereinbelow.

That is, the drawing processing section 1531 executes the drawing (1831)and the activation of the print processing section (1832). The printprocessing section 1532 executes the processes such as instruction ofthe print (1833) and the like.

In a manner similar to the case of the first embodiment, the secondembodiment can be also realized as expanded functions to the inventionshown in FIG. 5 which has already been filed. Namely, the processes ofthe drawing processing section and the print processing section can beexecuted as a multi task construction in a concurrent or parallelmanner. In such a case, the component elements in FIG. 15 are madecorrespond to the component elements in FIG. 5 in a manner similar tothe case of the first embodiment. According to the above realizingmethod, since the CPU, the printer engine, and page buffer (alsoconstructed by a plurality of pages) can be used without a blank time,the print throughputs in the normal state and the error recovery areimproved and the print at the highest speed of the printer engine can berealized.

A processing procedure of each section in the print control apparatuswill now be described with reference to FIG. 19.

The processing procedure of the drawing processing section 1531 issubstantially the same as in case of the first embodiment (FIG. 6)except the following two points.

(1) The processes (611, 612-1) after the discriminating step regardingwhether the reprint error flag is ON or not are deleted from the drawingpreparation (609).

(2) The command buffer preserving process (636-3) is deleted from thepage changing process.

The processing procedure of the print processing section 1532 will nowbe described with reference to FIG. 19. In this processing procedure,the reservation of the printer (1909), the confirmation of the readystate (1910), the confirmation of the paper feed section and paperdischarge section (1911), and the instruction of the paper feed sectionand paper discharge section (1912) are executed and, thereafter, thepage buffer preserving process (1913) is executed. In the page bufferpreserving process (1913), the print block 16C0 and the like in whichthe relevant print page number 16C2 of the object to be printed isprovided as a second element and the print task number 16C3 to executethe printing process is provided as a third element are connected to theend of the command buffer discharge queue 1541. The content of the pagebuffer is preserved. Subsequently, the print processing section 1532instructs the printer control section 156 to print regarding the page byusing the print instructing section 15321 (1914). In the above printinstruction, however, the printer control section 156 is instructed insuch a mode as to preserve the content of the page buffer withoutclearing to 0. After the print was instructed, the print processingsection 1532 is set into the paper discharge end waiting state (1915).The print processing section which has been released from the dischargeend waiting state by the discharge end process 2, which will beexplained hereinlater, executes the preservation page buffer clearingprocess (1916) by using the preservation page buffer releasing section15323. In the preservation page buffer clearing process (1916), thezero-clearing process of the page buffer for the page number recorded inthe second element of the head print block of the page buffer dischargequeue section (1916-1) and the removing of the head print block from thepage buffer discharge end queue (1916-2) are executed. In case of usinga variable length page buffer control method (U.S. patent applicationSer. No. 08/003,943, now U.S. Pat. No. 5,265,209, which is acontinuation of U.S. patent application Ser. No. 07/605,280, nowabandoned) as an invention which has already been filed by the sameinventors as the present invention, the pages of the number which isdecided by the paper size are cleared.

After that, the print processing section 1532 sequentially executes theprinter free (1917) and the task end (1918). The interrupting processingprocedure in the printer control section 156 is similar to that in caseof the first embodiment (FIG. 8). The processing procedure in the timercontrol section is similar to that in case of FIG. 9 except a point thatthe discharge end process 2 is activated in place of the discharge endprocess A (914 in FIG. 9) when the discharge end monitoring timer hastimed out.

The processing procedure of the discharge end process B (correspondingto 15622 and 17122) will now be described with reference to FIG. 20. Inthe processing procedure, after the serial number of the page in whichthe paper discharge had been completed was updated (2011), the dischargeend waiting state of the print processing section is canceled withrespect to the print task of the task number recorded as a third elementin the head print block of the page buffer discharge queue (2042).

The processing procedure of the abnormality processing section 157 willnow be described with reference to FIG. 21. After the process (2100) toset the print control apparatus into the printable state or the like,the confirmation of the printer error state (2141) until the causes ofthe error are eliminated and the display of the confirmed error to theuser operation panel section 5107 (2142) are substantially the same asthose in case of the first embodiment. The abnormality processingsection 157 subsequently executes the following processes.

(1) A check is made to see if the detected error is one such as paperjam or printer door open during the printing operation which needs thereprint or not (2160). If YES, the following processes are executed.

(1-1) All of the processes of the print processing section 1532 areforcedly finished (2161-2).

(1-2) The preservation page buffer reprinting process is executed(2162-2). In the preservation page buffer reprinting process, as shownin FIG. 22, a check is made to see if the drawing content in which thepaper discharge is not completed yet has been preserved in the pagebuffer or not by discriminating whether the page buffer discharge queueis blank or not (2212). If it is not blank, the printing processes areactivated with respect to the page numbers recorded as second elementsin accordance with the order from the head with regard to all of theprint blocks of the page buffer discharge queue (2222).

(1-3) The print control apparatus 1510 is set into the printable state(online) and such a fact is displayed to the user operation panelsection 5107 (2163).

(1-4) The processes of the drawing processing section 131 are restarted(2164-2).

(2) When the detected error is not one which needs the reprint, thefollowing processes are executed.

(2-1) The print control apparatus 1510 is set into the printable state(online) and such a fact is displayed on the user operation panelsection 5107 (2165).

(2-2) The processes of the print processing section and the drawingprocessing section are restarted (2166).

The processing procedure of the host computer 100 is similar to that incase of FIG. 13. The hardware construction of the print controlapparatus 1510 is also similar to that in case of FIG. 14.

In the second embodiment, it is sufficient to merely prepare capacity ofthe page buffer corresponding to the number of pages for one paper andthere is no need to prepare the special command buffer dedicated for theerror recovery and having the capacity for the maximum number of papersas in the first prior art, so that the C/P (costs to performance) ratioof the print control apparatus can be raised. On the other hand, sincethe drawing result itself has been preserved in the page buffers, evenfor the command of the such a type that drawing attribute parameters arehanded over between the pages, the print result doesn't differ from theinherent print upon error recovery and the reliability and useefficiency of the print control apparatus can be raised. In addition,the increase in processing burden of the host computer and themodification of the program in the second prior art can be alsoeliminated. Further, since the command read skipping process in thethird prior art can be eliminated, the increase in development programamount of the print control apparatus can be eliminated.

The third embodiment of the invention will now be described.

A construction of a print control apparatus in the third embodiment willbe first explained with reference to a constructional diagram of FIG.23. A print control apparatus 2310 includes: a host communicationcontrol section 230; a command buffer 231; a command buffer managingsection 232; a command processing section 233; a page buffer controlsection 234; a page buffer 235; a printer control section 236; anabnormality processing section 237; a file control section 238; acommand file writing section 23315; a command file reading section 239;and a secondary memory device 2381.

The host communication control section 230 and the command buffermanaging section 232 execute processes similar to those in the firstembodiment (in case of FIG. 1). However, the command buffer dischargequeue section 121 in FIG. 1 is not provided in a command buffermanagement table section of the command buffer managing section 232.

The command processing section 233 includes a drawing processing section2331 and a print processing section 2332. The drawing processing section2331 also executes processes similar to those in the first embodiment(in case of FIG. 1) and reads out the command from the command buffer231 and interprets and executes. When the page changing condition is metduring the execution of the command, the drawing of the page is finishedand the print processing section 2332 is activated with respect to thepage buffer for which the drawing has been performed. A command filepreserving section 23311, a preparing section 23313 for using thepreserved content of command files to prepare for redrawing/reprint, anda command file management table section 23314 are provided in thedrawing processing section 2331. The command file preserving section23311 preserves the content of the command file for each page and theattribute parameter file at the start of the drawing of each page intothe secondary memory device 2381 for preparation of the error recoveryby using the command file writing section 23315. The preparing section23313 prepares for the reprint by using the preserved command files. Thecommand file management table section 23314 receives the command filename and attribute parameter names about each page and describes as aqueue according to the order of the pages to be printed in order tomanage the command files.

The print processing section 2332 instructs the printer control section236 to print by using a print instructing section 23321 in a mannersimilar to the case of the first embodiment. The page buffer controlsection 234, the page buffer section 235, and the printer controlsection 236 also execute functions similar to those in case of the firstembodiment.

A discharge end monitoring section 2361 and a discharge end processingsection C 23623 are provided in the printer control section. Thedischarge end monitoring section 2361 monitors the end of paperdischarge from a printer engine 2320 of the print paper and activatesthe discharge end processing section C 23623 at a time point of thedetection of the end of paper discharge.

The abnormality processing section 237 executes abnormality processesfor various kinds of abnormalities detected by respective sections inthe print control apparatus 2310. A reprint preparing section B 2373 isprovided for the abnormality processing section 237, thereby preparingfor the reprint when the error which needs the reprint is detected.

The secondary memory device 2381 has a memory medium such as a magneticdisk, a floppy disk, a semiconductor memory disk, or the like, therebyallowing the command file for each page and the attribute parameter fileto be stored into the memory medium.

The file control section 238 controls each file in the secondary memorydevice 2381. Therefore, supervisor calling interfaces (hereinafter,simply abbreviated to SVC) such as open, close, read, write, and thelike are provided to the processes (2331 and 2332) in the commandprocessing section and to the command file reading section 239.

As mentioned above, the command file writing section 23315 writes thecommand file for each page and the attribute parameter file at the startof the drawing of each page into the secondary memory device 2381. Thecommand file reading section 239 reads out the commands from thepreserved command file for each page and stores into the read commandbuffer section 231 in the recovery process with respect to the errorwhich needs the reprint.

The content of the command file management table section 23314 will nowbe described with reference to FIG. 24. The management table section23314 includes: a reprint error flag 241; a pointer 242 of the root of apreservation command file queue; a pointer 243 of the root of apreservation attribute parameter file queue; an ECB (abbreviation ofEvent Control Block) 244 for waiting a file blank; a file blank waitingsize 245; a size of print command remaining in the command buffer 246;and a command work valid command size 247. Among them, the reprint errorflag 241 has a value of 0 or 1. The value "0" indicates the case wherethe error which needs the reprint doesn't occur. The value "1" indicatesthe case where such an error has occurred.

Names (242A2, 242B2, etc.) of the command files in which the preservedcommands about each page have been stored are described as thepreservation command file queue in the order of the pages which arereceived and printed. On the other hand, names (243A2, 243B2, etc.) ofthe attribute parameter files in which the preservation attributeparameters regarding each page have been preserved are described as thepreservation attribute parameter file queue in the order of the pageswhich are received and printed.

The command file writing section 23315 executes a writing process intothe files for preparation of the error recovery. The ECB 244 for waitingthe file blank mentioned above is provided in order to set the commandfile writing processing section into the file blank waiting state in thecase of exceeding a limit value for writing and preserving in thewriting process and to control the release from such a waiting state inthe case where an enough blank has yielded in the file for preservation.

The file blank waiting size 245 is an area to describe the blank size tobe waited for in the above file blank waiting state. The print commandsize 246 and the command work valid command size 247 are areas todescribe the capacities of a portion 3733 and a portion 3732 in FIG. 37,which will be explained hereinlater.

The operating procedure in the normal state of the print controlapparatus will now be described with reference to FIG. 25.

The procedures from the reception and storage (2501) of the printcommand train to the drawing (2503) are the same as those in case of thefirst embodiment (FIG. 3). Thereafter, in the embodiment, in place ofthe command buffer preserving process (3041), the command filepreserving process (25042) is executed and the print processing sectionis activated (2505). Thereafter, the processes from the generation(2507) of the print instruction to the printer control section 236 bythe print processing section 2332 to the updating (2514) of the printend page number are executed in accordance with substantially the sameprocedure as that in case of the first embodiment (FIG. 3) except thatthe discharge end process C 25123 is executed in place of the dischargeend process A (3121) in FIG. 3 by the printer control section 236.

In the discharge end process C 25123, the substances and names of thecommand files for the preserved head page are respectively deleted fromthe secondary memory device 2381 and the command file management tablesection 23314 with reference to the command file management tablesection 23314. Further, the substances and names of the attributeparameter files for the preserved head page are also deleted from thesecondary memory device 2381 and the command file management tablesection 23314. Then, in the discharge end process C (25123), a check ismade to see if the command file writing section 23315 is in the fileblank waiting state or not. If YES, a check is made to see if the blanksas much as the file blank waiting size 245 have yielded by the abovedeletion or not. If YES, the command file writing section 23315 isreleased from the foregoing file blank waiting state.

The operating procedure in the abnormal state of the print controlapparatus is similar to that in case of FIG. 4 except that the reprintpreparation B (not shown) is executed in place of the reprintpreparation A (3291) in FIG. 4. In the reprint preparation B, a check ismade to see if the command files in which the paper discharge is notcompleted yet have been preserved in the command files or not, bydiscriminating whether the foregoing preservation command file queue isblank or not. If YES, the reprint error flag is set to ON and then thecommand file writing section 23315 is activated in the writing mode 3.The writing mode is an input mode to select and instruct the filewriting content by the command file writing section 23315 uponactivation of the above processing procedure and will be explainedhereinlater with reference to FIGS. 29 and 30.

The embodiment can be also realized as an expanded function to theinvention which has already been filed in a manner similar to the caseof the first embodiment. That is, the processes of the drawingprocessing section and the print processing section can be set to amulti task construction and can be also executed in a concurrent orparallel manner. In this case, the component elements in FIG. 23 aremade correspond to the component elements in FIG. 26 in a manner similarto the case of the first embodiment. In the embodiment, the followingprocesses to make correspond are further executed.

(1) File control section 238→file control section 26121

(2) Secondary memory device 2381→secondary memory device 26122

(3) Command file writing section 23315→command file write taskprocessing section 26134

(4) Command file reading section 239→command file read task processingsection 26133

According to the above realizing method, since the CPU, the printerengine and the page buffer (can be also constructed by a plurality ofpages) can be used without an idle time, the print throughputs in thenormal state and upon error recovery can be improved and the print atthe highest speed of the printer engine can be realized.

A processing procedure of each section of the print control apparatuswill now be described with reference to FIGS. 27 to 37. Although thecase where the print control apparatus is set to the multi taskconfiguration as shown in FIG. 26 will be described, the invention canbe also similarly realized with respect to the case of the configurationof FIG. 23. In the description, each processing section is written likethe drawing task processing section 26131 (drawing processing section2331). That is, first, the processing section in case of FIG. 26 havingthe multi task construction is written and the processing section incase of FIG. 23 is written in the parentheses.

The processing procedure of the drawing task processing section 26131(drawing processing section 2331) will be first described with referenceto FIGS. 27 and 28. First, the initialization and the like of variouskinds of parameters for drawing are executed by the drawing preparation(2709). In the drawing preparation (2709), as shown in FIG. 28, a checkis made to see if the reprint error flag 241 is OFF or not (281). If itis OFF, the following three items are executed.

(1) The command work is obtained by using the command work reservingfunction. The obtained command work number is set to i. The command workindicates a buffer memory to assist the storage of the commands to thefile and will be explained hereinlater with reference to FIG. 27 (2811).

(2) The initial values are set into the drawing attribute parametertable to describe various kinds of parameters for drawing (2812).

(3) The attribute parameter file for the first page of a document isformed and stored. As a content of the attribute parameter file for thefirst page, the content of the drawing attribute parameter table isstored (2813).

When the reprint error flag 241 is ON, the following four items areexecuted as a process for using preserved command file to prepareredrawing/reprint by the preparing section 23313 (282).

(1) The content of the file of the attribute parameter file name (243A2)for the preserved first page disclosed in the command file managementtable section is read out from 23821 within the secondary memory device2381 and is set as a value of the drawing attribute parameter table inthe drawing task processing section 26131 (drawing processing section2331) (2821).

(2) The command buffer 231 is set into the blank state. Actually, thecontent is not cleared to 0 but the various pointers (23 to 26 and thelike) are merely reset (2822).

(3) The processes by the command file read task processing section 26133(command file reading section 239) are activated (2823).

(4) The processes of the drawing task processing section 26131 (drawingprocessing section 2331) are set into the command buffer storage waitingstate by the command file read task processing section 26133 (commandfile reading section 239) (2824).

In the processing steps 2823 and 2824, a task priority of the commandfile read task processing section 26133 is set to the same priority asthat of the drawing task processing section 26131. This is because afterthe command file read task was activated, the drawing task is set intothe command storage waiting state, thereby subsequently allowing thecommand file read task to be executed. As an execution control method ofthe task using the task priority, a method similar to that disclosed inthe invention which has already been filed is used.

In a manner similar to the case of the first embodiment, aftercompletion of the drawing preparation, the interpretation of the command(2721) and the execution of the command (2730) are repeated as drawingprocesses through an endless loop (2720). In the embodiment, in thecommand interpretation (2721), the commands are sequentially stored intothe command work area from the command buffer. When a predeterminedamount of commands are stored in the command work area, the contents ofthe command work area are sequentially stored into the command file byusing the command file preserving section 23311 of the drawing taskprocessing section 26131 (drawing processing section 2331). The commandfile is stored as individual file with respect to each page of thedocument in the following manner as will be explained in detailhereinlater. First, a check is made to see if the reprint error flag 241is OFF or not (2722). If YES, the commands are stored into a commandwork area i from the command buffer (27221). A check is made to see ifthe command work area i is full or not (27222). If YES, the followingthree items are executed.

(1) The command work area number j for writing the file is set into i asthe command work area number which has been obtained just before(27223).

(2) The processes by the command file write task processing section26134 (command file writing section 23315) are activated in the writingmode 1 (27224).

(3) The command work area is obtained by using the command work areareserving function and the derived command work area number is set to i(27225).

After completion of the processes 2722 to 27225, in a manner similar tothe case of the first embodiment, the drawing task processing section26131 (drawing processing section 2331) executes the interpretingprocess of the command (2723). After completion of the interpretingprocess 2723, a check is made to see if the command buffer is blank ornot (2724). If YES, a check is made to see if the reprint error flag 241is OFF or not (27241). If YES, namely, when the error which needs thereprint doesn't occur yet, the drawing task processing section 26131(drawing processing section 2331) is set into the command buffer storagewaiting state by the host computer 2610 (27242). When the reprint errorflag 241 is ON, that is, when the error which needs the reprint hasoccurred and the apparatus is in the error recovery mode using thepreserved file content, the command file read task processing section26133 (command file reading section 239) is released from the commandfile blank waiting state (27243). Thereafter, the drawing taskprocessing section 26131 (drawing processing section 2331) is set intothe command buffer storage waiting state by the command file read taskprocessing section 26133 (command file reading section 239) (27244).Thereafter, in a manner similar to the case of the first embodiment, thedrawing task processing section 26131 (drawing processing section 2331)executes the command (2730). In the embodiment, the command bufferpreserving process (636-3) provided in the first embodiment is deletedfrom the page changing procedure (2736). In place of the command bufferpreserving process, as shown in FIG. 27, a check is made to see if thereprint error flag 241 is OFF or not (27361). If YES, the followingthree items are executed.

(1) The command work area number j for writing the file is set into i asthe command work area number which has been obtained just before(27362).

(2) The command file write task processing section 26134 (command filewriting section 23315) is activated in the writing mode 2 (27363).

(3) The command work area is obtained by using the command work areareserving function and the derived command work area number is set to i(27364).

The processing procedure of the print task processing section 26132(print processing section 2332) and the interrupting processingprocedure by the printer control section 236 are substantially the sameas those in FIGS. 7 and 8 shown in the first embodiment, respectively.The processing procedure in the timer control section is similar to thatin case of FIG. 9 except a point that the discharge end process C isactivated in place of the discharge end process A (914 in FIG. 9) whenthe discharge end monitoring timer has timed out.

The processing procedure of the command file write task processingsection 26134 (command file writing section 23315) will now be describedwith reference to FIG. 29.

(1) The writing mode is taken out from the input parameter area (291).

(2) A check is made to see if the current total file writing amountwhich is determined as shown in FIG. 30 in accordance with the writingmode is equal to the write total limit value or less or not (292). IfYES, the process shown in the following item (3) is executed. If NO, theprocess shown in the following item (4) is executed.

(3) [In the case where the current total file writing amount is equal toor less than the write total limit value]

The following processes (3-1) to (3-3) are executed as processes whichare common to the writing modes 1 to 3. In the command work area, thevalid amount of command work area in which the commands have been storedis written into the file.

(3-1) In the content of the command work area j for writing the file,only the valid amount of command work area in which the commands havebeen stored is written into the file by using the foregoing write SVC(2931).

(3-2) The content of the command work area j is cleared to 0 (2932).

(3-3) The command work area j is released by using the command work areafree function (2933).

(3-4) In the writing mode 2 or 3, the processes (3-4-1) to (3-4-2) areexecuted and the commands of the amount which are not yet read out tothe command work area in the command buffer (hereinafter, simplyreferred to command buffer remaining print commands) are written intothe file. The size of (3-4-1) command buffer remaining print commands iswritten into the relevant item 246 in the command file management tablesection 23314 (29341).

(3-4-2) The command buffer remaining print commands are written into thefile (29342).

(3-5) Subsequently, a check is made to see if the writing mode is set to2 or not (2935). In the writing mode 2, the processes (3-5-1) to (3-5-4)are executed and the content in the drawing attribute parameter table iswritten into the file.

(3-5-1) The drawing attribute work table is obtained by using thedrawing attribute work table reserving function. The derived drawingattribute work table number assumes k. The drawing attribute work tableis a buffer memory to assist the storage of the drawing attributeparameter table into the file. Two drawing attribute work tables areprepared here and when data is written into one of the drawing attributework tables, the data is read out from the other table, thereby enablingthe writing and reading operations to be processed in parallel (29351).

(3-5-2) The contents of the drawing attribute parameter tables arecopied to the obtained drawing attribute work table k (29352).

(3-5-3) The content of the drawing attribute work table k is writteninto the file by using the foregoing write SVC (29353).

(3-5-4) The drawing attribute work table k is released by using thedrawing attribute work table free function (29354).

(4) [In the case where the current total file writing amount is largerthan the total writing limit value]

A check is made to see if a total file writing amount t with respect tothe currently preserved pages is equal to or less than the writing limitvalue 1 per page or not (2936). If YES, the following items (4-1) and(4-2) are executed. If NO, the item (4-3) is executed.

(4-1) As a file blank waiting size, the absolute value of the differencebetween the above total file writing amount t and the writing limitvalue 1 per page is written into the relevant item 245 in the commandfile management table section 23314 (29361).

(4-2) The command file write task processing section 26134 (command filewriting section 23315) is set into the file blank waiting state. Thesetting into such a waiting state and the subsequent release arecontrolled by using the ECB 244 for waiting the file blank (29362).

(4-3) The error recovering mode is set into another mode from thecommand file preservation error recovering mode (29363).

The setting to the error recovering mode is executed in the followingmanner.

(1) With respect to the pages which have been preserved before the filebecomes full, the error recovery is executed by using the contents ofthe preserved files and by using the procedure described so far in theembodiment and the reprint is executed. After completion of the errorrecovery using the preserved files, the mode is set into the errorrecovering mode shown at 29363.

(2) The error recovering mode is shifted to either one of (i) the errorrecovering mode using the main memory such as page buffer preservationerror recovering mode, command preservation error recovering mode, orthe like, (ii) the error recovering mode using the commandretransmission from the host computer, and (iii) the errornon-recovering mode.

(3) In a print control apparatus such that the writing limit value 1 perpage mentioned above is small and the occurrence probability of theshift to the error recovering mode is large, the mode is set into themode (i) or (ii). In a print control apparatus such that the writinglimit value 1 per page is large and the occurrence probability of theshift to the error recovering mode is very small, the mode is set intothe mode (iii).

(4) At a time point when the print control apparatus confirms thecompletion of the paper discharge with regard to all of the printcommand trains received from the host computer or one head documentamong them, the mode is returned from the error recovering mode after itwas shifted to either one of the modes (i) to (iii) to the errorrecovering mode before the mode shift using the preserved files.

The mode shift can be also performed among following arbitrary errorrecovering modes described above.

(a) Command buffer preservation error recovering mode

(b) Page buffer preservation error recovering mode

(c) Command file preservation error recovering mode

(d) Error recovering mode using the foregoing drawing image filepreserving method

(e) Error non-recovering mode

The processing procedure of the discharge end process C will now bedescribed with reference to FIG. 31. In the processing procedure, afterthe serial number of the page in which the paper discharge had beencompleted was updated (311), the substances and names of the commandfiles for the preserved head page are respectively deleted from thesecondary memory device 2381 and the command file management tablesection 23314 with reference to the command file management tablesection 23314. Further, the substances and names of the attributeparameter files for the preserved head page are also deleted from thesecondary memory device 2381 and the command file management tablesection 23314 (312). Thereafter, a check is made to see if the commandfile write task processing section 26134 is in the file blank waitingstate or not (313). If YES, a check is made to see if the blank for thefile blank waiting size 245 has occurred by the above file deletion 312or not (314). If YES, the command file write task processing section26134 is released from the foregoing file blank writing state (315).Subsequently, the print task which has activated the discharge endmonitor is released from the discharge end writing state (316).

The processing procedure of the abnormality processing section 237 willnow be described with reference to FIG. 32. The confirmation of theprinter error state (3241) and the display of the confirmed error to theuser operation panel section 26107 (3242) after the process (320) to setthe print control apparatus to the print disable state and the likeuntil the causes of the errors are eliminated are substantially the sameas those in case of the first embodiment. Subsequently, the abnormalityprocessing section 237 executes the following processes.

(1) A check is made to see if the detected error is one such as paperjam or printer door open during the printing operation which needs thereprint or not (325). If YES, the following processes are executed.

(1-1) All of the processes of the print task processing section 26132(print processing section 2332) and the drawing task processing section26131 (drawing processing section 2331) are forcedly finished (3251).

(1-2) The reprint preparation B is executed (3252). In the reprintpreparation B, as shown in FIG. 33, a check is made to see if thecommands in which the paper discharge is not completed yet have beenpreserved as command files or not by discriminating whether thepreservation command file matrix is not blank or not (331). If they havebeen preserved, the reprint error flag is set to ON (3321) and the printcontrol apparatus is set into the command non-receiving state (3322).Thereafter, the command file write task processing section 26134(command file writing section 23315) is activated in the writing mode 3(3323).

(1-3) Then, the drawing task processing section 26131 (drawingprocessing section 2331) is activated (3253). As described before, inthe activated drawing task processing section 26131, since the reprinterror flag has already been set to ON in step 3321, the process 282 forusing the preserved command file to prepare redrawing/reprint as shownin FIG. 28 is executed.

(2) When the detected error is not one which needs the reprint, thefollowing processes are executed.

(2-1) The print control apparatuses 2310 and 2610 are set into theprintable state (online) and such a fact is displayed on the useroperation panel section 26107 (3254).

(2-2) The processes of the print processing section 2332 and the drawingprocessing section 2331 are restarted (3255).

(3) The task end is generated (3256). The task end is needed in case ofrealizing the print control apparatus by the multi task configuration.

The processing procedure of the command file read task processingsection 26133 (command file reading section 239) will now be describedwith reference to FIGS. 34 to 37.

(1) In the processing procedure, the following processes are firstexecuted as a pre-process.

(a) "1" is set into the variable i (34A1).

(b) Two parameters as parameters to read the command file for thepreserved first page are set as follows (34A2).

(b-1) "1" is set into the read start byte position.

(b-2) The capacity not yet read out is set to the capacity of the file.

(c) The command buffer remaining capacity is set into the command buffertotal capacity (34A3).

(2) The following processes are repeated until the contents of all ofthe preserved command files are completely stored into the commandbuffer 231 (34B0).

(2-1) A check is made to see if the command file is not the finalcommand file (files 371 to 372 in FIG. 37) or not. When the file is notthe final command file, the following processes are executed (34C0).

(a) The following processes are repeated until the command buffer 231becomes full (34C1).

(a-1) A check is made to see if the command buffer remaining capacity isequal to or larger than the capacity not yet read out of the commandfile for the i-th preserved page or not (34C2).

(a-2) If YES, the following processes are executed.

(a-2-1) The content of the command file for the i-th preserved page isstored into the command buffer 231 (34C3).

(a-2-2) "1" is added to i (34C4).

(a-2-3) Two parameters as parameters to read out the command file forthe i-th preserved page are set as follows (34C5).

(a-2-3-1) "1" is set into the read start byte position.

(a-2-3-2) The capacity not yet read out is set to the capacity of thefile.

(a-3) When the command buffer remaining capacity is smaller than thecapacity not yet read out in the discriminating step 34C2, the followingprocesses are executed.

(a-3-1) The contents as much as the command buffer remaining capacityafter the read start byte position of the command file for the i-thpreserved page are stored into the command buffer 231 (34C6).

(a-3-2) Two parameters as parameters for reading out the command filefor the i-th preserved page are set as follows (34C7).

(a-3-2-1) The value of the command buffer remaining capacity is added tothe value of the read start byte position.

(a-3-2-2) The value of the command buffer remaining capacity issubtracted from the value of the capacity not yet read out.

(a-4) The value of the command buffer remaining capacity is updated tothe value which is determined as a result of the process (a-2) or (a-3)(34C8).

(b) When the command buffer becomes full, the following processes areexecuted.

(b-1) When the drawing task processing section 26131 (drawing processingsection 2331) is in the command buffer storage waiting state (34D1) bythe command file read task processing section 26133 (command filereading section 239), it is released from such a waiting state (34D2).

(b-2) The command file read task processing section 26133 (command filereading section 239) is set into the command buffer blank waiting state(34D3).

(2-2) When the file is the final command file (file 373 in FIG. 37), theprocess regarding the final command file (34E0) is executed as shown inFIG. 35.

(3) After the contents of all of the preserved command files werecompletely stored into the command buffer, the following post-processesare executed and the processes of the command file read task processingsection are finished.

(a) The reprint error flag 241 is set to OFF (34F0).

(b) The print control apparatus is set into the print command receivablestate (34F1).

(c) The task end is generated (34F2). The task end is also necessary incase of realizing the embodiment as a multi task configuration asmentioned above.

The process (34E0) about the final command file will now be describedwith reference to FIG. 35.

(1) First, the recovering process (351) about the portion (3731 in FIG.37; capacity a) which has already been preserved in the file at the timepoint of the occurrence of the error among the command files for thepreserved final page is executed in accordance with the procedure ofFIG. 36.

(2) The command file read task processing section 26133 (command filereading section 239) is set into the command buffer blank waiting state(352).

(3) The command work area corresponding portion (3732 in FIG. 37;capacity b; the valid command portion in the command work which has beenstored and preserved as mentioned above by the command file write taskprocessing section 26134 by the processes in FIG. 29) in the commandfiles for the preserved last page is transferred to the command buffer(353).

(4) The command buffer remaining print command area (3733 in FIG. 37;capacity c) among the command files for the preserved last page istransferred to the command buffer (354).

(5) The command work area corresponding portion 3732 and the portion ofthe command buffer remaining print command area 3733 are deleted fromthe command files for the preserved last page (355).

The recovering process (351) about the file preserved portion at thetime point of the occurrence of the error will now be described by usingFIG. 36.

(1) Two parameters as parameters to read out the command file for thepreserved last page are set as follows (34A2).

(1-1) "1" is set into the read start byte position.

(1-2) The capacity not yet read out is set to the capacity a of the filepreserved portion at the time point of the occurrence of the errormentioned above.

(2) The command buffer remaining capacity is updated to the currentvalue (362).

(3) The following processes are repeated until the contents as much asthe capacity a in the preserved command files are completely stored intothe command buffer 231 (363).

(3-1) The following processes are repeated (364) until the commandbuffer 231 becomes full.

(a) A check is made to see if the command buffer remaining capacity isequal to or larger than the capacity not yet read out of the commandfiles for the preserved last page or not (3641). If it is equal to orlarger than the not-yet-read capacity, the contents as much as thenot-yet-read capacity of the command files for the preserved last pageare stored into the command buffer 231 (3642).

(b) When it is smaller than the not-yet-read capacity, the contents asmuch as the command buffer remaining capacity after the read start byteposition of the command files for the preserved last page are storedinto the command buffer 231 (3643).

(c) -Two parameters as parameters to read out the command files for thepreserved last page are set as follows (3644).

(c-1) The value of the command buffer remaining capacity is added to thevalue of the read start byte position.

(c-2) The value of the command buffer remaining capacity is subtractedfrom the value of the not-yet-read capacity.

(d) The value of the command buffer remaining capacity is updated to thevalue which is determined as a result of the process 3642 or 3643(3645).

(3-2) The following processes are executed when the command buffer 231becomes full.

(a) When the drawing task processing section 26131 (drawing processingsection 2331) is in the command buffer storage waiting state (365) bythe command file read task processing section 26133 (command filereading section 239) (365), it is released from such a waiting state(366).

(b) The command file read task processing section 26133 (command filereading section 239) is set into the command buffer blank waiting state(367).

The command file read task processing section 26133 (command filereading section 239) deletes only the command buffer remaining printcommand area in the preserved command files. The other areas are deletedon a page unit basis by executing the processing procedure of FIG. 31 bythe discharge end processing section C 23623. It is now assumed that theerror which needs the reprint has again occurred during the errorrecovering process with respect to the pages from the preserved headpage to the preserved last page using the file preservation data. Inthis case, the processing procedure of FIG. 32 by the abnormalityprocessing section 237 is again activated and the processes are againsimilarly executed. That is, the recovering process is performed byusing the file preservation data remaining at the time point of theerror detection. The processing procedure of the host computer 100 issimilar to that in case of FIG. 13. The hardware constructions of theprint control apparatuses 2310 and 2610 are also similar to those incase of FIG. 14.

In the embodiment, the command buffer capacity can be reduced (theapparatus can operate even at most one byte) and there is no need toprepare the special command buffers of the number only for the errorrecovery as many as the maximum holding number as in the first priorart, so that the C/P (costs to performance) ratio of the print controlapparatus can be raised. On the other hand, since the drawing attributeparameters at the start of the drawing of each page have been preservedin the attribute parameter file for each page, even for the command ofthe type such that the drawing attribute parameters are handed overbetween the pages, the print result doesn't differ from the inherentprint upon error recovery and the reliability and use efficiency of theprint control apparatus can be improved. In addition, the increase inprocessing burden of the host computer and the modification of theprogram in the second prior art can be also eliminated. Further, sincethe command read skipping process in the third prior art can beeliminated, an increase in development program amount of the printcontrol apparatus can be eliminated. By commonly using a plurality ofkinds of error recovering modes, the error recovering function of thehigh performance and high reliability can be also provided to the userin accordance with the hardware construction of the print controlapparatus and its use situation, particularly, the use situation of thesecondary memory device.

The fourth embodiment of the invention will now be described. The fourthembodiment is obtained by devising the preserving method of theregistration data for error recovery in the foregoing third embodiment.The registration data denotes fonts/external characters, formats, apainting pattern, a line type pattern, etc., which are used in thedrawing process by the print control apparatus and is a kind of drawingattribute parameters mentioned above. However, an amount of registrationdata is large. In the third embodiment, the registration data is alsopreserved similar to the other drawing attribute parameters and used forerror recovery. That is, the registration data is individually preservedevery page. In the embodiment, the registration data can be commonlypreserved with respect to a plurality of pages, thereby reducing thefile capacity which is required for preservation. In particular, withregard to the fonts/external characters, a plurality of sets (maximum Lsets) of them can be registered every page. The other registration datais preserved into one file in a lump with respect to each page everykind such as a format, a painting pattern, a line type pattern, or thelike.

To realize the above construction, a registration data preservationmanagement table shown in FIG. 40 is provided and the registration datais preserved and stored as shown in FIG. 41 while using such a table.For instance, the format data of one page is stored into a file 413corresponding to a file name 403d and is commonly used between a serialnumber 403b of the page whose use is started and a serial number 403c ofthe page whose use has been finished. With respect to the fonts/externalcharacters as well, the first font/external character data file issimilarly stored into a file 411 corresponding to a file name 401d andcommonly used between a use start page serial number 401b and a use endpage serial number 401c. With respect to the fonts/external characters,the second font/external character data file is further stored in a file412 corresponding to a file name 402d and commonly used between a usestart page serial number 402b and a use end page serial number 402c. Inthis manner, the maximum L sets of fonts/external characters can bepreserved with respect to one page.

According to the embodiment, since the registration data such asfonts/external characters, formats, and the like are commonly used andpreserved with respect to a plurality of pages, the file capacity forpreservation can be reduced as compared with that of the thirdembodiment. Therefore, the print control apparatus of a high costperformance can be realized.

In the above embodiments, by using either one of the following methods,the print control apparatus can be also realized as one function of thehost computer.

(1) The print control apparatus is realized as one print control adapterin the host computer or a print control board and the error recoveringfunction as mentioned above is installed to the adapter or board.

(2) The print control apparatus is realized as a software process by amain processor of the host computer. In this instance, the errorrecovering function as mentioned above is installed in the softwareprocess.

What is claimed is:
 1. A print control apparatus for receiving a printcommand train from a host computer and for performing a print control toa printer engine, in which said print command train has at least drawingcommands which are arranged in accordance with the order of print pagesand indicate drawing information such as characters, figures, images, orthe like, and attribute parameter setting commands which are arranged atarbitrary positions and indicate a format or the like to draw saiddrawing information regarding the drawing commands after said arbitrarypositions as image data, comprising:a communication control section toreceive said print command train; a command buffer to store the receivedprint command train; a drawing processing section for sequentiallyreading out the print command train from the command buffer andexecuting a drawing process of drawing dot image data in accordance withthe print command train in a normal state and for again sequentiallyreading out the print command train after a page which is not yetdischarged at a time point of the occurrence of an abnormality andexecuting the drawing process in accordance with the print command trainin a state in which the abnormality occurs; a page buffer to store thedot image data drawn by said drawing processing section; a printprocessing section to instruct a printer control section to print withrespect to the dot image data stored in said page buffer; a printercontrol section for reading out the dot image data from the page bufferand executing the print control to the printer engine in accordance withan instruction from said print processing section; an abnormalityprocessing section for monitoring an abnormality of the printer engineand for activating a reprinting process of the drawing processingsection in the case where an abnormality which needs a reprint hasoccurred; and an attribute parameter table to store at least currentattribute parameters set in accordance with the print command train readout by the drawing processing section until all of the pages regardingsaid attribute parameters are discharged; wherein said drawingprocessing section executes the drawing process by the attributeparameters of the page whose drawing process is again performed whichhave been stored in said attribute parameter table when the abnormalitywhich needs the reprint occurs.
 2. An apparatus according to claim 1,wherein the attribute parameters which are stored into said attributeparameter table are stored in correspondence to memory positions ofevery page of the print command train in the command buffer.
 3. Anapparatus according to claim 1, wherein said attribute parameter tableis made of a series of command blocks each of which includes:a pointerto the next command block; a command page end pointer preserving sectionindicative of the end of paper discharge waiting page of the commandbuffer section; and an attribute parameter table preserving section topreserve the attribute parameters at such a time point.
 4. An apparatusaccording to claim 1, wherein processes by said drawing processingsection and said print processing section have a multi task constructionand are executed in a concurrent or parallel manner.
 5. An apparatusaccording to claim 1, wherein the start of said reprinting process atthe time of detection of the error is performed in accordance with aninstruction from the host computer.
 6. An apparatus according to claim1, further comprising:a secondary memory device for storing the printcommand train received from said command buffer as a plurality ofcommand files such that the print commands of each page are described; acommand file preservation control section to control the writing andreading operations of the command files; and a command file managementtable to manage the memory positions in said secondary memory device ofthe command files, wherein when said abnormality processing sectionactivates the reprinting process of said drawing processing section,said command file preservation control section reads out the commandfiles of the page which needs the reprint from the secondary memorydevice to the command buffer by recognizing the memory positions by saidcommand file management table section, and said drawing processingsection executes the drawing process to reprint by the print commandtrain newly stored in the command buffer.
 7. An apparatus according toclaim 6, wherein said command file preservation control section furtherstores the attribute parameters at the time of the start of the drawingof each page as an attribute parameter file into the secondary memorydevice.
 8. An apparatus according to claim 7, wherein said command filemanagement table section describes command file names and attributeparameter file names with respect to each page as a queue in accordancewith the receiving and printing order of the pages.
 9. A print controlapparatus for receiving a print command train from a host computer andfor performing a print control to a printer engine, in which said printcommand train has at least drawing commands which are arranged inaccordance with the order of print pages and indicate drawinginformation such as characters, figures, images, or the like, andattribute parameter setting commands which are arranged at arbitrarypositions and indicate a format or the like to draw said drawinginformation regarding the drawing commands after said arbitrarypositions as image data, comprising:a communication control section toreceive said print command train; a command buffer to store the receivedprint command train; a drawing processing section for sequentiallyreading out the print command train from the command buffer andexecuting a drawing process of drawing dot image data in accordance withthe print command train in a normal state and for again sequentiallyreading out the print command train after a page which is not yetdischarged at a time point of the occurrence of an abnormality andexecuting the drawing process in accordance with the print command trainin a state in which the abnormality occurs; a page buffer to store thedot image data drawn by said drawing processing section; a printprocessing section to instruct a printer control section to print withrespect to the dot image data stored in said page buffer; a printercontrol section for reading out the dot image data from the page bufferand executing the print control to the printer engine in accordance withan instruction from said print processing section; an abnormalityprocessing section for monitoring an abnormality of the printer engineand for activating a reprinting process of the drawing processingsection in the case where an abnormality which needs a reprint hasoccurred; and an attribute parameter table to store at least attributeparameters set in accordance with the print command train read out bythe drawing processing section until all of the pages regarding saidattribute parameters are discharged; wherein said drawing processingsection executes the drawing process by the attribute parameters of thepage whose drawing process is again performed which have been stored insaid attribute parameter table when the abnormality which needs thereprint occurs; the apparatus further comprising:a secondary memorydevice for storing the print command train received from said commandbuffer as a plurality of command files such that the print commands ofeach page are described; a command file preservation control section tocontrol the writing and reading operations of the command files; and acommand file management table to manage the memory positions in saidsecondary memory device of the command files; wherein when saidabnormality processing section activates the reprinting process of saiddrawing processing section, said command file preservation controlsection reads out the command files of the page which needs the reprintfrom the secondary memory device to the command buffer by recognizingthe memory positions by said command file management table section, andsaid drawing processing section executes the drawing process to reprintby the print command train newly stored in the command buffer; andwherein an error recovering function which doesn't use said secondarymemory device and an error recovering function which uses the secondarymemory device are switched in accordance with the print command receivedfrom said host computer or a user's input from an operation panel in theprint control apparatus.
 10. A print control apparatus for receiving aprint command train from a host computer and executing a print controlto a printer engine, in which said print command train indicates atleast drawing information of characters, figures, images, or the like,and attribute parameter setting information indicative of a format todraw said drawing information as image data, comprising:a communicationcontrol section to receive said print command train; a command buffer tostore the received print command train; a drawing processing section forsequentially reading out said print command train from said commandbuffer and executing a drawing process of drawing dot image data ofevery page in accordance with the print command train; a page buffer forstoring the dot image data drawn by said drawing processing sectionuntil printing of a current page is finished; a print processing sectionto instruct a printer control section to print with respect to the dotimage data stored in said page buffer; a printer control section forreading out the dot image data from said page buffer and executing aprint control to said printer engine in accordance with an instructionfrom said print processing section; an abnormality processing sectionfor monitoring an abnormality of the printer engine and for activating areprinting process of the printer control section in the case where anabnormality which needs a reprint has occurred; and a page buffer numberpreserving section to preserve page buffer numbers indicative of memorypositions in said page buffer of a paper discharge waiting page; whereinwhen the abnormality which needs the reprint occurs, said printercontrol section reads out the dot image data of the page in which theabnormality has occurred based on the page buffer number of the page inwhich the abnormality has occurred which has been preserved in said pagebuffer number preserving section and executes the print control of theprint engine.
 11. An apparatus according to claim 10, wherein said pagebuffer number preserving section is made of a series of command blockseach of which includes:a pointer to the next command block; a pagebuffer number; and a print task number of the printer control section.12. An apparatus according to claim 10, wherein the processes by saiddrawing processing section and said print processing section are setinto a multi task construction and are executed in a concurrent orparallel manner.
 13. An apparatus according to claim 10, wherein thestart of the reprinting process at the time of the error detection isperformed in accordance with an instruction from a host computer.
 14. Aprint control method for a printing apparatus in which a print commandtrain is received by a communication control section and is temporarilystored into a command buffer and a drawing process and a print controlare executed to a printer engine by the print command train in saidcommand buffer, and said print command train has at least drawingcommands which are arranged in accordance with the order of print pagesand indicate drawing information such as characters, figures, images, orthe like, and attribute parameter setting commands which are arranged atarbitrary positions and indicate a format or the like to draw saiddrawing information regarding said drawing commands after said arbitrarypositions as image data, wherein said method comprises:a first step ofreceiving said print command train by said communication controlsection; a second step of storing the received print command train intothe command buffer; a third step of sequentially reading out the printcommand train from the command buffer and interpreting the commands; afourth step of storing attribute parameters obtained by the commandinterpretation of said attribute parameter setting commands in saidthird step in correspondence to memory positions in said command bufferof the print commands to which said attribute parameters belong; a fifthstep of executing a drawing process of drawing image data in accordancewith the command interpretation in said third step; a sixth step ofexecuting a print control to said printer engine in accordance with theimage data which has been drawing-processed in said fifth step; aseventh step of monitoring an abnormality in said sixth step, and whenan abnormality which needs a reprint occurs, sequentially reading outthe print command train from the command buffer and interpreting thecommands, with respect to a page which needs a reprint, and retrievingthe attribute parameters stored in said fourth step in correspondence tothe print commands of the page which needs a reprint; an eighth step ofagain executing the drawing process of drawing image data in accordancewith the command interpretation and the retrieved attribute parametersin said seventh step; and a ninth step of again printing in accordancewith the image data which has been drawing-processed in said eighthstep.
 15. A method according to claim 14, wherein the storage of theattribute parameters in said sixth step is executed in correspondence tothe memory positions of every page of the print command train in saidcommand buffer.
 16. A method according to claim 15, wherein theprocesses in the seventh to ninth steps are executed in accordance withinstructions from the host computer which transmits said print commandtrain.
 17. A print control method for a printing apparatus in which aprint command train is received by a communication control section, saidprint command train indicates drawing information such as characters,figures, images, or the like, and attribute parameter settinginformation indicative of a format or the like to draw said drawinginformation as image data, a drawing process of drawing image data isexecuted by said print command train, the image data obtained by saiddrawing process is temporarily stored into a page buffer, and a printcontrol of the image data of said page buffer is performed to a printerengine, wherein said method comprises:a first step of receiving theprint command train from a host computer by said communication controlsection; a second step of storing the received print command train intoa command buffer; a third step of sequentially reading out the printcommand train from the command buffer and interpreting the commands; afourth step of executing a drawing process of drawing image data ofevery page in accordance with the command interpretation in said thirdstep; a fifth step of temporarily storing the image data which has beendrawing-processed in said fourth step into the page buffer andpreserving memory positions of the image data of every page in said pagebuffer; a sixth step of reading out the image data stored in said fifthstep and executing the print control to said printer engine; a seventhstep of monitoring an abnormality in said sixth step and, when anabnormality which needs a reprint occurs, again reading out the imagedata of a page which needs a reprint from the page buffer by saidpreserved memory positions and again executing the print control to saidprinter engine; and an eighth step of confirming the end of printing ofa relevant page in said sixth or seventh step and, thereafter, erasingor updating the image data at the memory positions of the relevant pagein said page buffer.
 18. A method according to claim 17, wherein theprocess in said seventh step is executed in accordance with aninstruction from the host computer to transmit said print command train.19. An apparatus according to claim 6, wherein when the abnormalityprocessing section activates the reprinting process of the drawingprocessing section and an amount of data in the command files stored inthe secondary memory device exceeds a predetermined amount of data, thereprinting process is performed in a command buffer preservation errorrecovering mode or a page buffer preservation error recovering modeuntil the amount of data in the command files stored in the secondarymemory device no longer exceed the predetermined amount of data, and isthen performed in a command file preservation error recovering mode bythe command file preservation control section.
 20. An apparatusaccording to claim 1, further comprising a secondary memory device forstoring the dot image data drawn by the drawing processing section for aplurality of pages.
 21. An apparatus according to claim 1, wherein theattribute parameters include registration data; andwherein the attributeparameter table stores at least some of the registration data commonlywith respect to a plurality of pages.